import request from '@/utils/request'

// 查询指导单位列表
export function listSponsor(query) {
  return request({
    url: '/committee/sponsor/list',
    method: 'get',
    params: query
  })
}
// 查询学生社团列表
export function listStu(query) {
  return request({
    url: '/committee/org/getOrgName',
    method: 'get',
    params: query
  })
}

// 查询指导单位详细
export function getSponsor(sponsorId) {
  return request({
    url: '/committee/sponsor/' + sponsorId,
    method: 'get'
  })
}

// 新增指导单位
export function addSponsor(data) {
  return request({
    url: '/committee/sponsor',
    method: 'post',
    data: data
  })
}

// 修改指导单位
export function updateSponsor(data) {
  return request({
    url: '/committee/sponsor',
    method: 'put',
    data: data
  })
}

// 删除指导单位
export function delSponsor(sponsorId) {
  return request({
    url: '/committee/sponsor/' + sponsorId,
    method: 'delete'
  })
}
